
<template>
  <div id="card1">
    <el-card class="box-card">
      <div id="box2">
      <i class="el-icon-success" id="icon1">支付成功</i>
      </div>
      <div  class="text item">
        <i class="el-icon-loading"></i>
        正在自动返回...
      </div>
    </el-card>
  </div>


</template>

<script>

    import Common from "../common/Common";
    import axios from "axios";

    export default {
        name: "PaySuccess",
      data(){
          return{
            href1:""
          }
      },

      mounted:function (){
          console.log("链接:"+window.location.href);
      var harf=this.$route.query.out_trade_no.toString();
      console.log(harf);
      var vars=harf.split("-");
      var orderid=vars[0];
      var pid=vars[1];
      console.log(orderid);
      console.log(pid);
        axios.get(Common.API+'Order/OrderChangeStatus',{
          params: {
            order_id: orderid,
            id:pid
          }
        })
          .then(Response=>{
            this.$router.replace("OrderManagement");
          })
       },


    }
</script>

<style scoped>
.text {
  font-size: 20px;
  color: #656b79;
}

.item {
  padding: 18px 0;
}

.box-card {
  width: 480px;
}

  #icon1{
    color: #409EFF;

  }
  #card1{
   text-align: center;
    width: 100%;
  }
  .box-card{
    width: 100%;
  }
#box2{
  font-size: 40px;
}
</style>
